// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import element from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'
import '#/static/css/icon/iconfont.css'
import router from './router/index.js'
import C from '#/src/common/common.js'
// const App = resolve => require(['./App.vue'], resolve)
import App from './App.vue'
Vue.use(element)
Vue.directive('qx', {
    bind: function (el, binding) {
        let val = binding.value
        let sto = []
        let permission = C.getLocalStorage('permission')
        if (permission !== 'undefined') {
            sto = JSON.parse(permission)
        }
        let empty = false
        sto.forEach((v) => {
            if (v === val) {
                empty = true
            }
        })
        if (!empty) {
            el.parentNode.removeChild(el)
        }
    }
})

/* eslint-disable no-new */
new Vue({
    el: '#app',
    router,
    template: '<App/>',
    components: { App }
})
